package cn.schoolwow.flow.monitor.module.business.configParameter.aware;

import cn.schoolwow.ams.domain.block.list.common.ListBlockButtonType;
import cn.schoolwow.ams.domain.block.list.dao.entityTable.EntityTableListBlockConfigAware;
import cn.schoolwow.ams.domain.block.list.dao.entityTable.EntityTableListBlockOption;
import cn.schoolwow.flow.monitor.entity.ConfigParameter;
import cn.schoolwow.flow.monitor.module.common.domain.FlowMonitorConstant;
import org.springframework.stereotype.Service;

@Service
public class ConfigParameterAware extends EntityTableListBlockConfigAware {
    @Override
    public EntityTableListBlockOption getAMSBlockConfig() {
        EntityTableListBlockOption entityTableListBlockOption = new EntityTableListBlockOption(
                FlowMonitorConstant.PROJECT_NAME,"配置参数", FlowMonitorConstant.DAO_NAME,
                ConfigParameter.class);
        entityTableListBlockOption.listBlockShowOption.displayFieldNames = new String[]{
                "name","value","comment","enable"
        };
        entityTableListBlockOption.listBlockShowOption.requestFieldNames = new String[]{"name", "enable"};
        entityTableListBlockOption.listBlockShowOption.listBlockButtonTypeArray = new ListBlockButtonType[]{
                ListBlockButtonType.UPDATE
        };
        entityTableListBlockOption.listBlockShowOption.updateDisplayFieldNames = new String[]{
                "name","className","beanName","value","comment","enable"
        };
        entityTableListBlockOption.listBlockShowOption.updateDisableFieldNames = new String[]{
                "name","className","beanName","comment",
        };

        return entityTableListBlockOption;
    }

}
